home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_100
/
163_02
/
strncat.c
< prev
next >
Wrap
Text File
|
1988-01-30
|
384b
|
11 lines
/*
** append s2 to s1, truncating at n characters if necessary
*/
strncat(s1, s2, n) char *s1, *s2; int n; {
char *strncat;
strncat = s1;
while(*s1) s1++;
while(n--) if(!(*s1++ = *s2++)) break;
return strncat;
}